// src/router/index.js
import { createRouter, createWebHistory } from 'vue-router';
import LoginRegister from '@/components/LoginRegister.vue';
import Shopping from '@/views/Shopping.vue'; // 导入购物页面
import OneWay from '@/views/OneWay.vue';
import RoundTrip from '@/views/RoundTrip.vue';

const routes = [
  {
    path: '/',
    redirect: '/shopping'
  },
  {
    path: '/shopping',
    name: 'Shopping',
    component: Shopping
  },
  {
    path: '/login',
    name: 'LoginRegister',
    component: LoginRegister
  },
  {
      path: '/one-way',
      name: 'OneWay',
      component: OneWay
  },
  {
      path: '/round-trip',
      name: 'RoundTrip',
      component: RoundTrip
  }
]

const router = createRouter({
  history: createWebHistory(),
  routes
})

export default router  